package com.views;

import java.awt.Color;
import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

public class ForgotPasswordView extends JInternalFrame {

	JLabel lblForgotPasswordLabel, lblUserName, lblQuestion, lblAnswer;

	JLabel lblMessages, lblUserNameError, lblQuestionError, lblAnswerError;

	JTextField txtUserName, txtQuestion, txtAnswer;

	JPasswordField txtPassword;

	JButton btnSubmit, btnReset;

	public JLabel getLblUserName() {
		return lblUserName;
	}

	public JLabel getLblQuestion() {
		return lblQuestion;
	}

	public JLabel getLblAnswer() {
		return lblAnswer;
	}

	public JLabel getLblMessages() {
		return lblMessages;
	}

	public JLabel getLblUserNameError() {
		return lblUserNameError;
	}

	public JLabel getLblQuestionError() {
		return lblQuestionError;
	}

	public JLabel getLblAnswerError() {
		return lblAnswerError;
	}

	public JTextField getTxtUserName() {
		return txtUserName;
	}

	public JTextField getTxtQuestion() {
		return txtQuestion;
	}

	public JTextField getTxtAnswer() {
		return txtAnswer;
	}

	public JPasswordField getTxtPassword() {
		return txtPassword;
	}

	public JButton getBtnSubmit() {
		return btnSubmit;
	}

	public JButton getBtnReset() {
		return btnReset;
	}

	public ForgotPasswordView() {

		super("Password Recovery", true, true, true, true);

		Font forgotPasswordFrameFont = new Font("Verdana", Font.BOLD, 15);

		setLayout(null);

		lblForgotPasswordLabel = new JLabel(
				"Fill the form to recover your password");
		lblMessages = new JLabel("");
		lblMessages.setFont(forgotPasswordFrameFont);
		lblMessages.setVisible(false);
		lblMessages.setForeground(Color.red);
		lblUserNameError = new JLabel("*");
		lblUserNameError.setForeground(Color.red);
		lblUserNameError.setFont(forgotPasswordFrameFont);

		lblForgotPasswordLabel.setForeground(Color.RED);
		lblForgotPasswordLabel.setFont(forgotPasswordFrameFont);
		lblUserName = new JLabel("Username");
		lblUserName.setFont(forgotPasswordFrameFont);
		lblUserName.setForeground(Color.white);
		lblQuestion = new JLabel("Question");
		lblQuestion.setFont(forgotPasswordFrameFont);
		lblQuestion.setForeground(Color.white);
		lblQuestionError = new JLabel("*");
		lblQuestionError.setForeground(Color.red);
		lblQuestionError.setFont(forgotPasswordFrameFont);
		lblAnswer = new JLabel("Answer");
		lblAnswer.setFont(forgotPasswordFrameFont);
		lblAnswer.setForeground(Color.white);
		lblAnswerError = new JLabel("*");
		lblAnswerError.setForeground(Color.red);
		lblAnswerError.setFont(forgotPasswordFrameFont);

		txtUserName = new JTextField();

		txtQuestion = new JTextField();
		txtAnswer = new JTextField();

		btnSubmit = new JButton("Submit");
		btnSubmit.setFont(forgotPasswordFrameFont);
		btnReset = new JButton("Reset");

		btnReset.setFont(forgotPasswordFrameFont);

		lblForgotPasswordLabel.setBounds(100, 30, 350, 50);
		lblMessages.setBounds(50, 300, 350, 50);
		lblUserName.setBounds(50, 100, 150, 30);
		lblQuestion.setBounds(50, 150, 150, 30);
		lblAnswer.setBounds(50, 200, 150, 30);
		lblUserNameError.setBounds(180, 100, 20, 20);
		lblUserNameError.setVisible(false);
		lblQuestionError.setBounds(180, 150, 20, 20);
		lblQuestionError.setVisible(false);
		lblAnswerError.setBounds(180, 200, 20, 20);
		lblAnswerError.setVisible(false);

		txtUserName.setBounds(200, 100, 150, 30);
		txtQuestion.setBounds(200, 150, 150, 30);
		txtAnswer.setBounds(200, 200, 150, 30);

		btnSubmit.setBounds(200, 250, 100, 40);
		btnReset.setBounds(330, 250, 100, 40);

		add(lblForgotPasswordLabel);
		add(lblMessages);
		add(lblUserNameError);
		add(lblQuestionError);
		add(lblAnswerError);
		add(lblUserName);
		add(lblQuestion);
		add(lblAnswer);
		add(txtUserName);
		add(txtQuestion);
		add(txtAnswer);
		add(btnSubmit);
		add(btnReset);

		setBackground(Color.black);
		setFont(forgotPasswordFrameFont);
		setVisible(true);
		setSize(500, 500);

	}
}
